

$(".list-middle").on("mouseover",".list-middle-img-list li",function(){
	$(this).parent().children('li').css({"border-color":"#ddd"});
	$(this).css({"border-color":"#b1544f"});
	$(this).parent().prev(".list-middle-item-img").children("img").attr("src",$(this).children('a').children('img').attr("src"))
})

var app = angular.module("myapp", []);
app.controller("mycontroller", function($scope, $http) {
	$scope.list = [];
	$http({
		url: "getList",
		method: "POST",
		headers: {
			'Content-Type': 'application/x-www-form-urlencoded'
		}
	}).success(function(res) {
		$scope.list = res.data;
	}).error(function(err) {
		console.log(err);
	})
	
	$scope.getshopcar = function(){
		$http({
			url: "getshopcar",
			method: "POST",
			headers: {
				'Content-Type': 'application/x-www-form-urlencoded'
			}
		}).success(function(res) {
			$(".header-num").html(res.data.length);
		   	if(res.data.length>0){
		   		$(".header-cartshow-text").html("去购物车并结算");
		   		$scope.goodlist=res.goodinfo;
		   	}
		}).error(function(err) {
			console.log(err);
		})
	}
	$scope.getshopcar();
	
	
})